<template>
  <div>
    <h2>I am User</h2>
    <p>information</p>
    <!-- <h2>{{$route.params.userId}}</h2> -->
    <h2>{{userId}}</h2>
    <button @click="btnClick">router信息</button>
  </div>
</template>

<script>
export default {
  name: "User",
  data() {
    return{

    }
  },
  components: {

  },
  computed: {
    userId() {
      return this.$route.params.userId
    }
  },
  methods: {
    btnClick() {
      console.log(this.$router);
      console.log(this.$route);
    }
  },
  // created() {
  //   console.log("created.");
  //   document.title = "用户";
  // }
}

</script>

<style scoped>

</style>